#define DEBUG
#include <cstdio>

using namespace std;

int main() {
#ifdef DEBUG
  freopen("4637.in", "r", stdin);
  freopen("4637.out", "w", stdout);
#endif
    
  int cas;
  scanf("%d", &cas);
  for (int i=1; i<=cas; i++) {
    int n, a;
    scanf("%d", &n);
    for (int j=1; j<n; j++) {
      scanf("%d", &a);
    }
    printf(n>1 ? "YES\n" : "NO\n");
  }
    
  fclose(stdin);
  fclose(stdout);
  return 0;
}
